<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div th:insert="demo/top :: top(~{::#top2})">
    <p >index</p>
    <p id="top2">index2</p>

</div>



<span th:utext="${userName}">张三</span>
<!--<div th:inline="text">-->
<!--<span>[[${userName}]]</span>-->
<!--</div>-->
<br/>
<span th:text="${session.userName}" th:style="'color:'+${color}+';'">李四</span>

<br/>
<span>当前时间为：<span th:text="${#dates.format(currentTime,'yyyy-MM-dd HH:mm:ss')}">2024-6-17</span></span>

<br/>
<span>价格：<span th:text="${#numbers.formatDecimal(price,0,4)}">100.00</span></span>




<form th:action="@{save}">

    姓名：<input th:value="${user.userName}">
    年龄：<input th:value="${user.age}">
    <input type="submit">

</form>


<!--<form th:object="${user}">-->

<!--    姓名：<input th:value="*{userName}">-->
<!--    年龄：<input th:value="*{age}">-->


<!--</form>-->


<div th:insert="demo/footer :: footer1"></div>
<div th:replace="demo/footer :: footer2">
    我是本身的底部

</div>
</body>

<script  th:inline="text">
  var userName="[[${userName}]]";
  console.log(userName);

</script>
</html>